/*
 * Copyright (C) 2020-2021 The qidianxue.cn Authors.
 * https://www.qidianxue.cn
 */

package com.qdxwx.data.mapper.area;

import com.qdxwx.models.area.Area;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */

@Repository
public interface AreaMapper {

    Area selectById(int id);

    int containsChild(int parentId, String name);

    List<Area> selectChildren(int parentId);

    int countChildren(int parentId);

    int insert(Area area);

    int update(Area area);

    int delete(int id);

    int changeChildCount(int id, int number);
}
